<template>
    <div class="mobheader" v-if="$store.state.winWidth <= 768">
        <i @click="goBack" class="el-icon-arrow-left"></i>
        <div class="name">
            <span>{{ pathName }}</span>
           <span v-if="num"> {{ num }}个职位正在招聘</span>
        </div>
        <img  @click="goPage('/jobIndex')" src="@/assets/img/index.svg" alt="">
    </div>
</template>

<script>
export default {
    props:{
        num:{
            type:Number
        }
    },
    computed: {
        path() {
            return this.$route.path
        },
        pathName() {
            return this.$route.meta.title
        }

    },
    methods: {
        goPage(url) {
            if (url) {
                this.$router.push(url)
            }

        },
        goBack() {
  this.$router.back()
}
    },
}
</script>

<style lang="scss" scoped>
.mobheader {
    position: fixed;
    z-index: 99;
    background-color: #fff;
    height: 250px;
    width: 100vw;
    top: 0;
    display: flex;
    align-items: center;
    padding: 0 120px;
    justify-content: space-between;
    img{
        width: 115px;
    height: 115px;
    }
    .name{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-size: 70px;
span{
    &:nth-child(2){
        font-size: 60px;
        color: #757474;
    }
}
    }
    i{
        font-size: 80px;
        font-weight: bold;
    }
}
</style>